//
//  FamilyModel.m
//  AILock
//
//  Created by 谭亚明 on 2020/6/23.
//  Copyright © 2020 tym. All rights reserved.
//

#import "FamilyModel.h"
#import "YYModel.h"

@implementation FamilyModel

//重写以下几个方法
- (void)encodeWithCoder:(NSCoder*)aCoder {
    [self yy_modelEncodeWithCoder:aCoder];
}

- (id)initWithCoder:(NSCoder*)aDecoder
{
    self = [super init];
    return [self yy_modelInitWithCoder:aDecoder];
}

- (id)copyWithZone:(NSZone*)zone {
    return [self yy_modelCopy];
}

- (NSUInteger)hash {
    return [self yy_modelHash];
}

- (BOOL)isEqual:(id)object {
    return [self yy_modelIsEqual:object];
}


-(NSString*)getRoleStr{
    if (self.familyRole == 1) {
        return @"家长";
    }else if(self.familyRole == 2){
        return @"成员";
    }
    return @"";
}

-(NSString*)getFamileHeadImage{
    return [NSString stringWithFormat:@"%@%@",BaseImageUrl,self.image];
}

@end
